package cn.mcch.investigator.adapter;

import android.content.Context;

import java.util.List;

import cn.mcch.investigator.R;
import cn.mcch.investigator.adapter.base.CommonExpandableListAdapter;
import cn.mcch.investigator.adapter.base.ViewHolder;
import cn.mcch.investigator.model.bean.CarType;

/**
 * Created by Administrator on 2016/12/20.
 */
public class CarTypeExpandableListAdapter extends CommonExpandableListAdapter<String,CarType> {

    public CarTypeExpandableListAdapter(Context context, List<String> groupDatas, List<List<CarType>> childDatas, int groupLayoutId, int childLayoutId) {
        super(context, groupDatas, childDatas, groupLayoutId, childLayoutId);
    }

    @Override
    protected void bindGroupData(ViewHolder viewHolder, int groupPosition, String data) {
        viewHolder.setText(R.id.tv_group_name, data);
    }

    @Override
    protected void bindChildData(ViewHolder viewHolder, int groupPosition, int CarList, CarType data) {
        viewHolder.setText(R.id.tv_child_name, data.name);
    }
}
